import service from "@/api/axios";

// 获取区域信息列表
export const getAreaListApi = (data) => {
    return service({
        url: "/areaManage",
        method: "GET",
        params: data
    })
}
// 获取所有正常区域信息列表
export const getAllAreaListApi = () => {
    return service({
        url: "/areaManage/getAreaList",
        method: "GET",
    })
}
// 修改区域
export const updateAreaApi = (data) => {
    return service({
        url: "/areaManage",
        method: "POST",
        data
    })
}
// 添加区域
export const addAreaApi = (data) => {
    return service({
        url: "/areaManage",
        method: "PUT",
        data
    })
}
// 启用区域
export const startAreaApi = (id) => {
    return service({
        url: `/areaManage/startArea/${id}`,
        method: "PUT",
    })
}
// 停用区域
export const endAreaApi = (id) => {
    return service({
        url: `/areaManage/${id}`,
        method: "DELETE",
    })
}